#define _CRT_SECURE_NO_WARNINGS
#include"SList.h"

void Test1()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 1);
	SListPrint(plist);

	SListPushFront(&plist, 66);
	SListPrint(plist);

	SListPopBack(&plist);
	SListPopBack(&plist);
	SListPopBack(&plist);
	SListPopBack(&plist);

	SListPrint(plist);
}
void Test2()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPrint(plist);

	SListNode* ret = SListFind(plist, 2);
	SListEraseAfter(ret);

	SListPrint(plist);

	//SListPopFront(&plist);
	//SListPopFront(&plist);
	//SListPopFront(&plist);


}

void Test3()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPrint(plist);

	SListNode* ret = SListFind(plist, 2);
	SLTErase(&plist,ret);
	SListPrint(plist);
	SLTDestroy(&plist);

}
int main()
{
	Test3();
	return 0;
}